home *** CD-ROM | disk | FTP | other *** search
- /* types */
-
- #define AUTO auto /* automatic variables */
- #define AGLOBAL ; /* global (project-scope) */
- #define MODULE static /* external static (file-scope) */
- #define PERSIST static /* internal static (function-scope) */
- typedef signed char ABOOL; /* 8-bit signed quantity (replaces BOOL) */
- typedef signed char SBYTE; /* 8-bit signed quantity (replaces Amiga BYTE) */
- typedef signed short SWORD; /* 16-bit signed quantity (replaces Amiga WORD) */
- typedef signed long SLONG; /* 32-bit signed quantity (same as LONG) */
- #define elif else if
-
- #define ASM __asm
- #define REG(x) register __ ## x
-
- #ifdef __STORM__
- #define __inline
- #define chip
- #define EXIT_SUCCESS 0
- #define EXIT_FAILURE 20
- AGLOBAL ULONG stcl_d(STRPTR out, ULONG val);
- AGLOBAL ULONG stcl_h(STRPTR out, ULONG val);
- #endif
- #ifdef LATTICE
- #define CONST_STRPTR STRPTR
- #endif
-
- // defined by AmigaOS are: IMPORT, UBYTE, UWORD, ULONG.
-
- #define STATUS_READY 0
- #define STATUS_BUSY 1
- #define STATUS_STOPPING 2
-
- #define BARUPDATES 50
-
- // page 1...
- #define GID_S_LY1 0
- #define GID_S_ST1 1
- #define GID_S_ST2 2
- #define GID_S_ST3 3
- #define GID_S_ST4 4
- #define GID_S_ST5 5
- #define GID_S_ST6 6
- #define GIDS_S GID_S_ST6
-
- // page 11...
- #define GID_1_LY2 0 // root layout
- #define GID_1_LB1 1 // listbrowser 1
- #define GID_1_ST1 2 // string 1
- #define GID_1_ST2 3 // string 2
- #define GID_1_ST3 4 // string 3
- #define GID_1_ST4 5 // string 4
- #define GID_1_ST5 6 // string 5
- #define GID_1_ST6 7 // string 6
- #define GID_1_ST7 8 // string 7
- #define GID_1_ST8 9 // string 8
- #define GID_1_ST9 10 // string 9
- #define GID_1_ST10 11 // string 10
- #define GID_1_ST11 12 // string 11 (chip RAM)
- #define GID_1_ST12 13 // string 12 (fast RAM)
- #define GID_1_ST13 14 // string 13 (hard disk controller)
- #define GID_1_ST14 15 // string 14 (expansion cards)
- #define GID_1_BU2 16 // button 2 (sender...)
- #define GID_1_BU3 17 // button 3 (other page)
- #define GID_1_BU4 18 // button 4 (program pathname ASL)
- #define GID_1_CH1 19 // chooser 1
- #define GID_1_CH2 20 // chooser 2
- #define GID_1_CH3 21 // chooser 3
- #define GID_1_CH4 22 // chooser 4
- #define GID_1_CH5 23 // chooser 5
- #define GID_1_IN1 24 // integer 1 (floppies)
- // page 12...
- #define GID_1_LY1 25 // root layout
- #define GID_1_BU1 26 // button 1 (other page)
- #define GID_1_TE1 27 // text editor 1
- #define GID_1_TE2 28 // text editor 2
- #define GID_1_TE3 29 // text editor 3
- #define GID_1_TE4 30 // text editor 4
- #define GID_1_TE5 31 // text editor 5
- #define GIDS_1 GID_1_TE5
-
- // page 21
- #define GID_2_LY1 0 // root layout
- #define GID_2_ST1 1 // string 1
- #define GID_2_ST2 2 // string 2
- #define GID_2_ST3 3 // string 3
- #define GID_2_ST4 4 // string 4
- #define GID_2_ST5 5 // string 5
- #define GID_2_ST6 6 // string 6
- #define GID_2_ST7 7 // string 7
- #define GID_2_TE1 8 // text editor 1 (long description)
- #define GID_2_LB1 9 // listbrowser 1 (main dir)
- #define GID_2_LB2 10 // listbrowser 2 (sub dir)
- #define GIDS_2 GID_2_LB2
-
- // page 31...
- #define GID_3_LY1 0 // root layout
- #define GID_3_XX1 1 // anything 1
- #define GID_3_BU1 2 // button 1
- #define GID_3_BU2 3 // button 2
- #define GID_3_ST1 4 // string 1
- #define GID_3_CB1 5 // checkbox 1
- #define GID_3_CB2 6 // checkbox 2
- #define GID_3_CB3 7 // checkbox 3
- #define GID_3_CB4 8 // checkbox 4
- #define GID_3_CB5 9 // checkbox 5
- #define GID_3_CB6 10 // checkbox 6
- #define GID_3_CB7 11 // checkbox 7
- #define GID_3_CB8 12 // checkbox 8
- #define GID_3_CB9 13 // checkbox 9
- // page 32...
- #define GID_3_LY2 14 // root layout
- #define GIDS_3 GID_3_LY2
-
- #define GID_4_LY1 0 // root layout
- #define GID_4_CH1 1 // chooser 1 (icon type)
- #define GID_4_CB1 2 // checkbox 1 (optimize?)
- #define GID_4_CB2 3 // checkbox 2 (planar?)
- #define GID_4_ST1 4 // string 1 (pathname(s))
- #define GID_4_ST2 5 // string 2 (status)
- #define GID_4_BU1 6 // button 1 (pathname(s) ASL)
- #define GID_4_BU3 7 // button 3 (process)
- #define GID_4_BU4 8 // button 4 (stop)
- #define GIDS_4 GID_4_BU4
-
- #define GID_5_LY1 0 // root layout
- #define GID_5_ST1 1 // string 1 (card)
- #define GID_5_ST2 2 // string 2 (manufacturer)
- #define GID_5_ST3 3 // string 3 (product)
- #define GID_5_ST4 4 // string 4 (description)
- #define GID_5_ST5 5 // string 5 (configdev)
- #define GID_5_ST6 6 // string 6 (driver)
- #define GID_5_ST7 7 // string 7 (serial number)
- #define GID_5_ST8 8 // string 8 (board addr)
- #define GID_5_ST9 9 // string 9 (board size)
- #define GID_5_ST10 10 // string 10 (slot addr)
- #define GID_5_ST11 11 // string 11 (slot size)
- #define GID_5_ST12 12 // string 12 (CPU)
- #define GID_5_ST13 13 // string 13 (FPU)
- #define GID_5_BU1 14 // button 1 (previous card)
- #define GID_5_BU2 15 // button 2 (next card)
- #define GID_5_CB1 16 // checkbox 1 (internal)
- #define GID_5_CB2 17 // checkbox 2 (official)
- #define GID_5_CH1 18 // chooser 1 (precedence)
- #define GID_5_IN1 19 // integer 1 (manufacturer ID)
- #define GID_5_IN2 20 // integer 2 (product ID)
- #define GIDS_5 GID_5_IN2
-
- #define GID_6_LY1 0 // root layout
- #define GID_6_ST1 1 // string 1
- #define GID_6_ST2 2 // string 2
- #define GID_6_ST3 3 // string 3
- #define GID_6_ST4 4 // string 4
- #define GID_6_ST5 5 // string 5
- #define GID_6_ST6 6 // string 6
- #define GID_6_BU1 7 // button 1 (pathname(s) ASL)
- #define GID_6_CB1 8 // checkbox 1 (raw view only?)
- #define GID_6_CB2 9 // checkbox 2
- #define GID_6_CB3 10 // checkbox 3
- #define GID_6_CB4 11 // checkbox 4
- #define GID_6_CB5 12 // checkbox 5
- #define GID_6_CB6 13 // checkbox 6
- #define GID_6_CB7 14 // checkbox 7
- #define GID_6_CB8 15 // checkbox 8
- #define GID_6_CB9 16 // checkbox 9
- #define GID_6_LB1 17 // listbrowser 1
- #define GID_6_LB2 18 // listbrowser 2
- #define GIDS_6 GID_6_LB2
-
- #define GID_7_LY1 0 // root layout
- #define GID_7_RA1 1 // radio 1 (source)
- #define GID_7_RA2 2 // radio 2 (destination)
- #define GID_7_CB1 3 // checkbox 1 (detabulate?)
- #define GID_7_CB2 4 // checkbox 2 (unwrap words?)
- #define GID_7_IN1 5 // integer 1 (tab size)
- #define GID_7_ST1 6 // string 1 (pathname(s))
- #define GID_7_ST2 7 // string 2 (status)
- #define GID_7_BU1 8 // button 1 (pathname(s) ASL)
- #define GID_7_BU3 9 // button 3 (process)
- #define GID_7_BU4 10 // button 4 (stop)
- #define GIDS_7 GID_7_BU4
-
- #define GID_8_LY1 0 // root layout
- #define GID_8_ST1 1 // string 1 (path)
- #define GID_8_ST2 2 // string 2 (log file)
- #define GID_8_ST3 3 // string 3 (capacity)
- #define GID_8_ST4 4 // string 4 (free)
- #define GID_8_ST5 5 // string 5 (total)
- #define GID_8_ST6 6 // string 6 (files)
- #define GID_8_ST7 7 // string 7 (dirs)
- #define GID_8_ST8 8 // string 8 (block size)
- #define GID_8_BU1 9 // button 1 (path ASL)
- #define GID_8_BU3 10 // button 3 (log file ASL)
- #define GID_8_BU4 12 // button 4 (update)
- #define GID_8_BU5 13 // button 5 (stop)
- #define GID_8_BU6 14 // button 6 (root)
- #define GID_8_BU7 15 // button 7 (parent)
- #define GID_8_LB2 16 // listbrowser 2 (path sizes)
- #define GID_8_CB1 17 // checkbox 1 (log to file?)
- #define GID_8_CB2 18 // checkbox 2 (include slack?)
- #define GID_8_CB3 19 // checkbox 3 (fix protection bits?)
- #define GID_8_CB4 20 // checkbox 4 (show subdirectories?)
- #define GID_8_CB5 21 // checkbox 5 (show files?)
- #define GID_8_CH1 22 // chooser 1 (view as)
- #define GID_8_FG1 23 // fuel gauge 1 (status)
- #define GIDS_8 GID_8_FG1
-
- #define GID_9_LY1 0 // root layout
- #define GID_9_CB1 1 // checkbox 1
- #define GID_9_CB2 2 // checkbox 2
- #define GID_9_CB3 3 // checkbox 3
- #define GID_9_CB4 4 // checkbox 4
- #define GID_9_CB5 5 // checkbox 5
- #define GID_9_CB6 6 // checkbox 6
- #define GID_9_CB7 7 // checkbox 7
- #define GID_9_BU1 9 // button 1 (revert)
- #define GID_9_BU2 10 // button 2 (write)
- #define GID_9_IN1 11 // integer 1 (SCSI_HOST_ID)
- #define GID_9_SP1 12 // space 1
- #define GIDS_9 GID_9_SP1
-
- #define GID_10_LY1 0 // root layout
- #define GID_10_CB1 1 // checkbox 1 (ok)
- #define GID_10_CB2 2 // checkbox 2 (changed)
- #define GID_10_CB3 3 // checkbox 3 (3rd-party)
- #define GID_10_CB4 4 // checkbox 4 (missing)
- #define GID_10_CB5 5 // checkbox 5 (check versions?)
- #define GID_10_CB6 6 // checkbox 6 (check dates/times?)
- #define GID_10_CB7 7 // checkbox 7 (log to file?)
- #define GID_10_CB8 8 // checkbox 8 (check sizes?)
- #define GID_10_ST1 9 // string 1 (logfile pathname)
- #define GID_10_ST2 10 // string 2 (snapshot pathname)
- #define GID_10_ST3 11 // string 3 (base path)
- #define GID_10_BU1 12 // button 1 (pathname ASL)
- #define GID_10_BU2 13 // button 2 (update)
- #define GID_10_BU3 14 // button 3 (stop)
- #define GID_10_BU4 15 // button 4 (snapshot ASL)
- #define GID_10_BU5 16 // button 5 (base path ASL)
- #define GID_10_LB1 17 // listbrowser (results)
- #define GID_10_FG1 18 // fuel gauge 1 (status)
- #define GID_10_RA1 19 // radio 1 (mode)
- #define GIDS_10 GID_10_RA1
-
- #define BUG 0
- #define COM 1
- #define ENH 2
-
- #define FONTX 8
- #define FONTY 8
-
- // ASCII values (vanillakey)
- #define TAB 9 /* horizontal tab */
- #define LF 10 /* linefeed */
- #define CR 13 /* carriage return */
- #define ESCAPE 27
- #define QUOTE 34 /* " */
-
- #define FUNCTIONS 10
-
- // Scancodes (rawkey)
- #define SCAN_GRAVE 0
- #define SCAN_1 1
- #define SCAN_8 8
-
- // Q, J, Z undefined.
- #define SCAN_W 17
- #define SCAN_E 18
- #define SCAN_R 19
- #define SCAN_T 20
- #define SCAN_Y 21
- #define SCAN_U 22
- #define SCAN_I 23
- #define SCAN_O 24
- #define SCAN_P 25
- #define SCAN_A 32
- #define SCAN_S 33
- #define SCAN_D 34
- #define SCAN_F 35
- #define SCAN_G 36
- #define SCAN_H 37
- #define SCAN_K 39
- #define SCAN_L 40
- #define SCAN_X 50
- #define SCAN_C 51
- #define SCAN_V 52
- #define SCAN_B 53
- #define SCAN_N 54
- #define SCAN_M 55
- #define SCAN_PERIOD 57
- #define SCAN_SLASH 58
- #define SCAN_ESCAPE 69
- #define SCAN_UP 76
- #define SCAN_DOWN 77
- #define SCAN_HELP 95
-
- #define GREY 0
- #define BLACK 1
- #define WHITE 2
- #define RED 3
- #define BLUE 4
- #define LIGHTGREY 5
- #define ORANGE 6
- #define YELLOW 7
- #define LIGHTGREEN 14
-
- #define TITLEBARTEXT "Report+ 5.63"
-
- #define FIRSTQUALIFIER 0x60
- #define LASTQUALIFIER 0x67
- #define KEYUP 0x80 /* key release */
-
- #define MN_PROJECT 0
- #define MN_HELP 1
-
- #define IN_NEW 0
- #define IN_OPEN 1
- #define IN_SAVE 3
- #define IN_SAVEAS 4
- #define IN_QUIT 6
-
- #define IN_ABOUT 0
-
- AGLOBAL void report1(void);
- AGLOBAL void report_gt_loop(ULONG class, struct Gadget* addr, UWORD code, UWORD qual);
- AGLOBAL void report_ra_loop(ULONG gid);
- AGLOBAL void report_exit(void);
- AGLOBAL void report_init(void);
- AGLOBAL void report_close(void);
- AGLOBAL void config(void);
- AGLOBAL void newreport(ABOOL display);
- AGLOBAL void openreport(void);
- AGLOBAL void savereport(ABOOL saveas);
- AGLOBAL void loadreport(void);
- AGLOBAL void getversion(STRPTR filename, STRPTR output);
-
- AGLOBAL void aminet_init(void);
- AGLOBAL void aminet_die(void);
- AGLOBAL void aminet1(void);
- AGLOBAL void aminet_loop(ULONG gid);
- AGLOBAL void aminet_exit(void);
- AGLOBAL void newaminet(ABOOL display);
- AGLOBAL void openaminet(void);
- AGLOBAL void saveaminet(ABOOL saveas);
- AGLOBAL void loadaminet(void);
- AGLOBAL ULONG Hook2Func(struct Hook *h, VOID *o, VOID *msg);
-
- AGLOBAL void acse1(void);
- AGLOBAL void acse2(void);
- AGLOBAL void acse3(void);
- AGLOBAL void acse_exit(void);
- AGLOBAL void decrypt(void);
- AGLOBAL void acse_loop(ULONG gid);
- AGLOBAL ULONG Hook3Func(struct Hook *h, VOID *o, VOID *msg);
- AGLOBAL void acse_closewindow(void);
-
- AGLOBAL void icon1(void);
- AGLOBAL void icon2(void);
- AGLOBAL void iconconvert(ABOOL gui);
- AGLOBAL void icon_loop(ULONG gid);
- AGLOBAL void icon_do(void);
- AGLOBAL void icon_die(void);
- AGLOBAL ULONG Hook4Func(struct Hook* h, VOID* o, VOID* msg);
-
- AGLOBAL void manuf1(void);
- AGLOBAL void manuf_loop(ULONG gid);
- AGLOBAL void manuf_config(void);
- AGLOBAL void manuf_die(void);
- AGLOBAL ULONG Hook5Func(struct Hook *h, VOID *o, VOID *msg);
-
- AGLOBAL void iff1(void);
- AGLOBAL void iff_loop(ULONG gid);
- AGLOBAL void iff_config(void);
- AGLOBAL void iff_die(void);
- AGLOBAL void iff_init(void);
- AGLOBAL void iff_exit(void);
- AGLOBAL ULONG Hook6Func(struct Hook *h, VOID *o, VOID *msg);
-
- AGLOBAL void eol1(void);
- AGLOBAL void eol2(void);
- AGLOBAL void eolconvert(ABOOL gui);
- AGLOBAL void eol_loop(ULONG gid);
- AGLOBAL void eol_die(void);
- AGLOBAL ULONG Hook7Func(struct Hook *h, VOID *o, VOID *msg);
-
- AGLOBAL void size_init(void);
- AGLOBAL void size_die(void);
- AGLOBAL void size1(void);
- AGLOBAL void updatesize(void);
- AGLOBAL void size_loop(ULONG gid);
- AGLOBAL void size_exit(void);
- AGLOBAL ULONG Hook8Func(struct Hook *h, VOID *o, VOID *msg);
-
- AGLOBAL void batt1(void);
- AGLOBAL void batt_loop(ULONG gid);
- AGLOBAL void batt_open(void);
- AGLOBAL void batt_save(ABOOL saveas);
- AGLOBAL void writebatt(ABOOL verify);
- AGLOBAL ULONG Hook9Func(struct Hook *h, VOID *o, VOID *msg);
-
- AGLOBAL void files1(void);
- AGLOBAL void files_loop(ULONG gid);
- AGLOBAL void files_init(void);
- AGLOBAL void files_exit(void);
- AGLOBAL void files_die(void);
- AGLOBAL ULONG Hook10Func(struct Hook *h, VOID *o, VOID *msg);
-
- // rp.c
- AGLOBAL void getdate(void);
- AGLOBAL void loop(void);
- AGLOBAL void rq(STRPTR text);
- AGLOBAL void cleanexit(SBYTE rc);
- AGLOBAL void closewindow(void);
- AGLOBAL void FreeNameNodes(struct List* ListPtr);
- AGLOBAL ABOOL asl(STRPTR pattern);
- AGLOBAL void readordie(STRPTR pathname);
- AGLOBAL void writeout(STRPTR pathname); // remember write() is reserved
- AGLOBAL ABOOL readin(STRPTR pathname);
- AGLOBAL void append(STRPTR pathname);
- AGLOBAL void clearlist(struct List*);
- AGLOBAL void AddNameToTail(struct List* ListPtr, STRPTR name);
- AGLOBAL void parse(STRPTR terminator);
- AGLOBAL void parsetoend(void);
- AGLOBAL ABOOL saveasl(STRPTR message, STRPTR pattern);
- AGLOBAL void handlemenus(UWORD code);
- AGLOBAL void lockscreen(void);
- AGLOBAL void unlockscreen(void);
- AGLOBAL void multiasl(STRPTR pattern);
- AGLOBAL ABOOL convert(ABOOL gui);
- AGLOBAL void checkabort(ABOOL gui);
- AGLOBAL void InitHook(struct Hook* hook, ULONG (*func)(), void* data);
- AGLOBAL ULONG Hook0Func(struct Hook* h, VOID* o, VOID* msg);
- AGLOBAL ULONG ASM hookEntry(REG(a0) struct Hook *h, REG(a2) VOID *o, REG(a1) VOID *msg);
- AGLOBAL void helpabout(void);
- AGLOBAL void clearreactionlist(struct List* ListPtr);
- AGLOBAL void openwindow(void);
- AGLOBAL ABOOL ra_checkbreak(void);
- AGLOBAL void sender(void);
- AGLOBAL void setbar(ULONG max);
- AGLOBAL ABOOL dirasl(void);
- AGLOBAL void comma(ULONG value, STRPTR commastring);
- AGLOBAL ULONG SenderHookFunc(struct Hook *h, VOID *o, VOID *msg);
- AGLOBAL void addreactionnode(struct List* ListPtr, STRPTR text);
- AGLOBAL void AddPathnameNode(struct List* ListPtr, STRPTR name);
- AGLOBAL void FreePathnameNodes(struct List* ListPtr);
-
- #define MEDFIELD 32
- #define LONGFIELD 64
- #define VLONGFIELD 256
- #define PATHNAMEFIELD 256
- #define LONGESTFIELD 16536
-
- AGLOBAL struct SharedStruct
- { UWORD function;
- TEXT thisfile[VLONGFIELD + 1], /* <= 254 characters per pathname */
- thatfile[VLONGFIELD + 1],
- pathname[VLONGFIELD + 1];
- };
-
- /* struct NameNode is simply an extended Node structure: a Node structure
- followed by 96 bytes which hold the name of the node. This is so that the
- NameNode structure can hold everything relevant to the node. */
- AGLOBAL struct NameNode
- { struct Node nn_Node;
- TEXT nn_Data[96];
- };
- AGLOBAL struct PathnameNode
- { struct Node Node;
- TEXT pathname[PATHNAMEFIELD + 1];
- // Used to hold complete pathnames.
- };
- AGLOBAL struct ReportStruct
- { ULONG floppies, type, severity, subsystem, agnus, denise, cpu, model;
- TEXT chipram[5],
- fastram[5],
- hard[MEDFIELD + 1],
- debug[LONGFIELD + 1],
- developer[LONGFIELD + 1],
- expansion[LONGFIELD + 1],
- summary[LONGFIELD + 1],
- ks[6],
- wb[6],
- pv[LONGFIELD + 1],
- pp[LONGFIELD + 1],
- thirdname[MEDFIELD + 1],
- thirdver[MEDFIELD + 1],
- thirdmanuf[MEDFIELD + 1],
- lastname[MEDFIELD + 1],
- firstname[MEDFIELD + 1],
- company[MEDFIELD + 1],
- phone[MEDFIELD + 1],
- email[MEDFIELD + 1],
- refer[VLONGFIELD + 1],
- referid[VLONGFIELD + 1],
- path[VLONGFIELD + 1],
- config[VLONGFIELD + 1],
- textfield[6][4096],
- output[VLONGFIELD + 1];
- };
- AGLOBAL struct AminetStruct
- { TEXT amishort[41], // `short' is a reserved keyword, of course
- uploader[41],
- author[41],
- requires[41],
- version[41],
- distribution[41],
- type[12], // ____/_____
- replaces[41],
- output[VLONGFIELD + 1],
- textfield[4096];
- ULONG maintype,
- subtype;
- };
- AGLOBAL struct IFFStruct
- { ULONG cd, rkm, obsolete, private, proposal, reserved, standard, unregistered, raw;
- TEXT pathname[PATHNAMEFIELD + 1];
- };
- AGLOBAL struct SizeStruct
- { ULONG total, free, capacity, blocksize, view, numfiles, numdirs,
- log, slack, fixprot; // these three are really booleans
- TEXT oldpath[PATHNAMEFIELD + 1], path[PATHNAMEFIELD + 1], logfile[PATHNAMEFIELD + 1];
- };
- AGLOBAL struct FilesStruct
- { ULONG show[4], // anything we want to use GetAttr() with must be ULONG
- log, checkversion, checkdatetime, checksize,
- entries, mode;
- TEXT logfile[PATHNAMEFIELD + 1],
- snapshot[PATHNAMEFIELD + 1],
- basepath[PATHNAMEFIELD + 1];
- };
- AGLOBAL struct IconStruct
- { ULONG optimize, planar, // these must be ULONG not ABOOL nor BOOL!
- type; // this must be ULONG not UWORD!
- TEXT pathname[VLONGFIELD + 1];
- };
-